<?php

namespace app\api\controller\intelligentlive;

use app\api\service\intelligentlive\OrderService;
use think\Request;

class Order
{
    protected $Service;
    public function __construct()
    {
        $this->Service = OrderService::getInstance();
    }

    public function upOrder(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->upOrder($params);
        return writeJson(200,$result,"订单更新完成");
    }

    public function getOrder(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->getOrder($params);
        return writeJson(200,$result,"获取数据成功");
    }

    public function dailyCount(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->dailyCount($params);
        return writeJson(200,$result,"获取数据成功");
    }

    public function countByGroup(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->countByGroup($params);
        return writeJson(200,$result,"获取数据成功");
    }

    public function excel(Request $request)
    {
        $params = $request->get();
        $result = $this->Service->excel($params);
        return writeJson(200,$result,"获取数据成功");
    }

    public function pushMsg(Request $request)
    {
        $params = $request->get();
        $result = $this->Service->pushMsg($params);
        return writeJson(200,$result,"通知成功");
    }
}